package com.java.star.mall.front.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 微信小程序配置类
 */
@Component
@ConfigurationProperties(prefix = "starmall.wx")
@Data
public class WxProperties {

    //小程序 appId
    private String appId;

    //小程序 appSecret
    private String appSecret;

    //小程序登录功能有关配置
    private LoginProperty login;

    //小程序地图功能有关配置
    private MapProperty map;

    @Data
    public static class LoginProperty {
        //code2Session请求地址
        private String url;

        //授权类型
        private String grantType;
    }

    @Data
    public static class MapProperty {
        //获取用户位置的请求地址
        private String url;

        //地图API key
        private String key;

        //地图接口授权key
        private String secretKey;
    }
}
